from django.urls import path, re_path
from www.views import account, course, mine, api

urlpatterns = [
    path('wx/login/', account.wx_login, name='wx_login'),
    path('wx/auth/', account.wx_auth, name='wx_auth'),
    path('logout/', account.logout, name='logout'),

    path('basic/', course.basic, name='basic'),
    path('office/', course.office, name='office'),
    path('web/', course.web, name='web'),
    path('spider/', course.spider, name='spider'),
    path('android/', course.android, name='android'),

    path('play/<int:cid>/<int:video_id>/', course.play, name='play'),

    path('vip/', course.vip, name='vip'),
    path('ali/notify/', course.ali_notify, name='ali_notify'),

    # 优惠券
    path('coupon/', mine.coupon, name='coupon'),

    # API
    path('api/fetch/course/info/', api.fetch_course_info, name='fetch_course_info'),
    path('api/create/chapter/', api.create_chapter, name='create_chapter'),
    path('api/create/video/', api.create_video, name='create_video'),

    # 首页管理
    path('', course.spider, name='index'),
]
